package com.huajin.gateway.flow.controller;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.huajin.gateway.flow.domain.NetPackage;
import com.huajin.gateway.flow.service.NetPackageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@RequestMapping("/netflow")
@RestController()
public class NetFlowDataController {


    @Autowired
    private NetPackageService netPackageService;


    @GetMapping("/getNetPackageGroupByDstPort")
    public Map<String, List<NetPackage>> getNetPackageGroupByDstPort() throws IOException {
        return netPackageService.getNetPackageGroupByDstPort();
    }
}
